/*
 * 简历 首页
 */
$(function(){
 
	loadData();
 
});

function loadData(){
	
	loadDegree();
	loadSex();
	loadAge();
	loadWorkExperience();
}

function commonAjax(){
	var result = '';
	$.ajax({
		type: 'GET',
		//data: jsonData,
	    url: url,
	    async: false,
	    dataType:"json",
	    success: function(data){
	    	result = data;
	    },
	    error: function(){
	    }
	});
	return result;
}

function loadDegree(){
	url = ctx + '/pieChartShow/degree';
	//jsonData = '';	//jsonData = {startTime:startTime,endTime:endTime};
	var  returnData= commonAjax();
	initPieChart(returnData.title,returnData.degree,document.getElementById('degreeMain'));
	
}

function loadAge(){
	url = ctx + '/pieChartShow/age';
	//jsonData = '';	//jsonData = {startTime:startTime,endTime:endTime};
	var  returnData= commonAjax();
	initPieChart(returnData.title,returnData.age,document.getElementById('ageMain'));
}

function loadSex(){
	url = ctx + '/pieChartShow/gender';
	//jsonData = '';	//jsonData = {startTime:startTime,endTime:endTime};
	var  returnData= commonAjax();
	initPieChart(returnData.title,returnData.gender,document.getElementById('sexMain'));
}

function loadWorkExperience(){
	url = ctx + '/pieChartShow/workingExperience';
	//jsonData = '';	//jsonData = {startTime:startTime,endTime:endTime};
	var  returnData= commonAjax();
	initPieChart(returnData.title,returnData.workingExperience,document.getElementById('workExperienceMain'));
}
